import { mgobexsInterface } from "../mgobexsInterface";
import { battleTime, battleType, roomInfo, sendInfoType } from "../model/gameType";
import player from "../model/playerModel";


let gameInfo: roomInfo = {
    time: battleTime[battleType.ready],
    players: [],
    state: battleType.ready,
    winner: -1
}
const gameServer: mgobexsInterface.GameServer.IGameServer = {
    mode: 'async',
    onInitGameData(): mgobexsInterface.GameData {
        return gameInfo;
    },
    //客户端发送消息 //自定义消息， 发送id， 游戏信息， 房间信息
    onRecvFromClient({ actionData: sendInfoType, sender, gameData, SDK, room, exports }: mgobexsInterface.ActionArgs<mgobexsInterface.UserDefinedData>): void {
        player
    }
}